import  jsonpath

wsc = {
    "money":19000,
    "house":{
        "beijing":["三环","四环","五环"],
        "shanghai":["静安区","浦东新区"]
    },
    "car":["bmw",'benz','audi','byd'],
    "pets":[
        {"name":"xiaohei","type":"dog"},
        {"name":"xiaobai","type":"cat"},
        {"name":"xiaofen","type":"cat"},
        {"name":"xiaolan","type":"dog"},
    ]
}

#jsonpath
#$.pets[0].type
# result=jsonpath.jsonpath(wsc, "$.pets[0].type")
result=jsonpath.jsonpath(wsc, "$..house") #可以查到这个json下的任何key的value值
print(result)

